package com.black.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.black.app.domain.AppUserLevel;
import com.black.app.mapper.AppUserLevelMapper;
import com.black.app.service.AppUserLevelService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tonneyyy
 * @description 针对表【app_user_level(手机端用户等级)】的数据库操作Service实现
 * @createDate 2024-09-28 15:01:49
 */
@Service
public class AppUserLevelServiceImpl extends ServiceImpl<AppUserLevelMapper, AppUserLevel>
        implements AppUserLevelService {

    @Override
    public List<AppUserLevel> getAllLevelName() {
        // 获取所有等级
        return this.baseMapper.getAllLevelName();
    }

    /**
     * 根据等级查询等级信息
     * @param level
     * @return
     */
    @Override
    public AppUserLevel findById(Integer level) {
        return this.baseMapper.selectById(level);
    }

    @Override
    public AppUserLevel getVipDiscount(String levelId) {
        return this.baseMapper.selectById(levelId);
    }
}




